home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / info / viper.info-1 < prev    next >
Encoding:
GNU Info File  |  1995-08-11  |  46.1 KB  |  1,019 lines

  1. This is Info file ../info/viper.info, produced by Makeinfo-1.63 from
  2. the input file viper.texi.
  3.  
  4. Distribution
  5. ************
  6.  
  7. Copyright (C) 1991 Aamod Sane
  8. Copyright (C) 1994 Michael Kifer
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided that
  16. the entire resulting derived work is distributed under the terms of a
  17. permission notice identical to this one.
  18.  
  19.    Permission is granted to copy and distribute translations of this
  20. manual into another language, under the same conditions as for modified
  21. versions.
  22.  
  23. 
  24. File: viper.info,  Node: Top,  Next: Overview,  Up: (DIR)
  25.  
  26. Viper
  27. *****
  28.  
  29.    We believe that one or more of the following statements are adequate
  30. descriptions:
  31.  
  32.      Viper Is a Package for Emacs Rebels;
  33.      it is a VI Plan for Emacs Rescue
  34.      and/or a venomous VI PERil.
  35.  
  36.    Technically speaking, Viper is a Vi emulation package for GNU Emacs
  37. 19 and XEmacs 19. Because of its reliance on minor mode keymaps, Viper
  38. will not work under Emacs 18. Viper implements most Vi and Ex commands.
  39. It gives you the best of both worlds: Vi keystrokes for editing
  40. combined with the GNU Emacs environment. Viper also fixes some common
  41. complaints with Vi commands.  This manual describes Viper,
  42. concentrating on the differences from Vi and new features of Viper.
  43.  
  44.    Viper, formerly known as VIP-19, was written by Michael Kifer.  It
  45. is based on VIP version 3.5 by Masahiko Sato and VIP version 4.4 by
  46. Aamod Sane.  Viper tries to be compatible with these packages.
  47.  
  48.    Viper is intended to be usable without reading this manual -- the
  49. defaults are set to make Viper as close to Vi as possible.  At startup,
  50. Viper will try to set the most appropriate default environment for you,
  51. based on your familiarity with Emacs. It will also tell you the basic
  52. GNU Emacs window management commands to help you start immediately.
  53.  
  54.    Although this manual explains how to customize Viper, some basic
  55. familiarity with Emacs Lisp would be a plus.
  56.  
  57.    It is recommended that you read the Overview node. The other nodes
  58. may be visited as needed.
  59.  
  60.    Comments and bug reports are welcome.  `kifer@cs.emacs.edu' is the
  61. current address for Viper bug reports.  Please use the Ex command
  62. `:submitReport' for this purpose.
  63.  
  64. * Menu:
  65.  
  66. * Overview::                    Must read to get started
  67. * Improvements over Vi::        New features, Improvements
  68. * Customization::               How to customize Viper
  69. * Commands::                    Vi and Ex Commands
  70.  
  71. * Key Index::                   Index of Vi and Ex Commands
  72. * Function Index::              Index of Viper Functions
  73. * Variable Index::              Index of Viper Variables
  74. * Package Index::               Index of Packages Mentioned in this Document
  75. * Concept Index::               Vi, Ex and Emacs concepts
  76.  
  77. * Acknowledgments::
  78.  
  79. 
  80. File: viper.info,  Node: Overview,  Next: Improvements over Vi,  Prev: Top,  Up: Top
  81.  
  82. Overview of Viper
  83. *****************
  84.  
  85.    Viper is a Vi emulation on top of Emacs. At the same time, Viper
  86. provides a virtually unrestricted access to Emacs facilities. Perfect
  87. compatibility with Vi is possible but not desirable. This chapter tells
  88. you about the Emacs ideas that you should know about, how to use Viper
  89. within Emacs and some incompatibilities.
  90.  
  91.    Viper was formerly known as VIP-19, which was a descendant of VIP
  92. 3.5 by Masahiko Sato and VIP 4.4 by Aamod Sane.
  93.  
  94. * Menu:
  95.  
  96. * Emacs Preliminaries::         Basic concepts in Emacs.
  97. * Loading Viper::                       Loading and Preliminary Configuration.
  98. * States in Viper::             Viper has four states orthogonal to
  99.                                 modes in Emacs.
  100. * The Minibuffer::              Command line in Emacs.
  101. * Multiple Files in Viper::     True multiple file handling.
  102. * Unimplemented Features::      That are unlikely to be implemented.
  103.  
  104. 
  105. File: viper.info,  Node: Emacs Preliminaries,  Next: Loading Viper,  Prev: Overview,  Up: Overview
  106.  
  107. Emacs Preliminaries
  108. ===================
  109.  
  110.    Emacs can edit several files at once. A file in Emacs is placed in a
  111. "buffer" that usually has the same name as the file. Buffers are also
  112. used for other purposes, such as shell interfaces, directory editing,
  113. etc.  *Note Directory Editor: (emacs)Dired, for an example.
  114.  
  115.    A buffer has a distinguished position called the "point".  A "point"
  116. is always between 2 characters, and is "looking at" the right hand
  117. character. The cursor is positioned on the right hand character. Thus,
  118. when the "point" is looking at the end-of-line, the cursor is on the
  119. end-of-line character, i.e. beyond the last character on the line. This
  120. is the default Emacs behavior.
  121.  
  122.    The default settings of Viper try to mimic the behavior of Vi,
  123. preventing the cursor from going beyond the last character on the line.
  124. By using Emacs commands directly (such as those bound to arrow keys),
  125. it is possible to get the cursor beyond the end-of-line. However, this
  126. won't (or shouldn't) happen if you restrict yourself to standard Vi
  127. keys, unless you modify the default editing style. *Note
  128. Customization::.
  129.  
  130.    In addition to the "point", there is another distinguished buffer
  131. position called the "mark". *Note Mark: (emacs)Mark, for more info on
  132. the mark. The text between the "point" and the "mark" is called the
  133. "region" of the buffer. For the Viper user, this simply means that in
  134. addition to the Vi textmarkers a-z, there is another marker called
  135. "mark". This is similar to the unnamed Vi marker used by the jump
  136. commands (" and "), which move the cursor to the position of the last
  137. absolute jump.  Viper provides access to the region in most text
  138. manipulation commands as `r' and `R' suffix to commands that operate on
  139. text regions, e.g., `dr' to delete region, etc.  *Note Basics::, for
  140. more info.
  141.  
  142.    Emacs divides the screen into tiled "windows". You can see the
  143. contents of a buffer through the window associated with the buffer.  The
  144. cursor of the screen is positioned on the character after "point".
  145. Every window has a "mode line" that displays information about the
  146. buffer.  You can change the format of the mode line, but normally if
  147. you see `**' at the beginning of a mode line it means that the buffer
  148. is "modified".  If you write out the contents of a buffer to a file,
  149. then the buffer will become not modified.  Also if you see `%%' at the
  150. beginning of the mode line, it means that the file associated with the
  151. buffer is write protected. The mode line will also show the buffer name
  152. and current major and minor modes (see below).  A special buffer called
  153. "Minibuffer" is displayed as the last line in a Minibuffer window. The
  154. Minibuffer window is used for command input output. Viper uses
  155. Minibuffer window for `/' and `:' commands.
  156.  
  157.    An Emacs buffer can have a "major mode" that customizes Emacs for
  158. editing text of a particular sort by changing the functionality of the
  159. keys.  Keys are defined using a "keymap" that records the bindings
  160. between keystrokes and functions. The "global keymap" is common to all
  161. the buffers.  Additionally, each buffer has its "local keymap" that
  162. determines the "mode" of the buffer.  If a function is bound to some
  163. key in the local keymap then that function will be executed when you
  164. type the key.  If no function is bound to a key in the local map,
  165. however, the function bound to the key in the global map will be
  166. executed. *Note Major Modes: (emacs)Major Modes, for more information.
  167.  
  168.    A buffer can also have a "minor mode". Minor modes are options that
  169. you can use or not. A buffer in `text-mode' can have `auto-fill-mode'
  170. as minor mode, which can be turned off or on at any time. In Emacs 19, a
  171. minor mode may have it own keymap, which overrides the local keymap when
  172. the minor mode is turned on.  For more information, *note Minor Modes:
  173. (emacs)Minor Modes.
  174.  
  175.    Viper is implemented as a collection of minor modes. Different minor
  176. modes are involved when Viper emulates Vi command mode, Vi insert mode,
  177. etc.  You can also turn Viper on and off at any time while in Vi
  178. command mode.  *Note States in Viper::, for more information.
  179.  
  180.    Emacs uses Control and Meta modifiers. These are denoted as C and M,
  181. e.g. `^Z' as `C-z' and `Meta-x' as `M-x'.  The Meta key is usually
  182. located on each side of the Space bar; it is used in a manner similar
  183. to the Control key, e.g., `M-x' means typing `x' while holding the Meta
  184. key down.  For keyboards that do not have a Meta key, ESC is used as
  185. Meta.  Thus `M-x' is typed as `ESC x'. Viper uses ESC to switch from
  186. Insert state to Vi state. Therefore Viper defines `_' as its Meta key
  187. in Vi state. *Note Vi State::, for more info.
  188.  
  189.    Emacs is structured as a lisp interpreter around a C core. Emacs keys
  190. cause lisp functions to be called. It is possible to call these
  191. functions directly, by typing `M-x function-name'.
  192.  
  193. 
  194. File: viper.info,  Node: Loading Viper,  Next: States in Viper,  Prev: Emacs Preliminaries,  Up: Overview
  195.  
  196. Loading Viper
  197. =============
  198.  
  199.    First, make sure that all six Viper files `viper*.el' are somewhere
  200. on Emacs "load path". The load path is a list of directories where Emacs
  201. looks for its Lisp code; it is similar to Unix environment variable
  202. PATH.  The load path is determined by the Lisp variable `load-path'.
  203.  
  204.    Type `C-h v load-path RET' to check the current load path of your
  205. Emacs. (Here and later, `RET' stands for carriage return.) If the files
  206. `viper*.el' are not in any directory on the load path, you should
  207. create your own directory and put it on the load path; then put
  208. `viper*.el' in that directory.  To put a new directory, say
  209. `~/emacslib', on your load path, add the following line at the
  210. beginning of your `~/.emacs' file:
  211.      (setq load-path (cons "~/emacslib" load-path))
  212.    It is recommended that you compile `viper.el' by running
  213.      make all
  214.    in the directory where Viper was unpacked. The best way to ensure
  215. that Viper is installed properly is to run
  216.      make install
  217.    in the directory where Viper was unpacked. See README in the Viper
  218. distribution for the details on which modifications to the make file
  219. may be necessary.
  220.  
  221.    Once Viper is settled on the load path, the most common way to load
  222. it automatically is to include the line:
  223.  
  224.      (require 'viper)
  225.  
  226. in your `~/.emacs' file.  The `.emacs' file is placed in your home
  227. directory and it will be executed every time you invoke Emacs.  Viper
  228. also uses the file `~/.vip' for Viper-specific customization.  If you
  229. wish to be in Vi command state whenever this is appropriate, you can
  230. include the following line in your `.vip':
  231.      (setq vip-always t)
  232.  
  233. (*Note Vi State::, for the explanation of Vi mode.)
  234.  
  235.    Once invoked, Viper will arrange to bring up Emacs buffers in Vi
  236. state whenever this makes sense.  *Note Packages that Change Keymaps::,
  237. to find out when forcing Vi command state on a buffer may be
  238. counter-productive.
  239.  
  240.    Even if your `.emacs' and `.vip' files do not contain any of the
  241. above lines, you can still load Viper and enter Vi state by typing the
  242. following from within Emacs:
  243.  
  244.      M-x load-library RET viper RET
  245.      M-x viper-mode
  246.  
  247. Ask your local Emacs administrator if this fails to work.
  248.  
  249.    When Emacs first comes up, if you have not specified a file on the
  250. command line, it will show the `*scratch*' buffer, in the `Lisp
  251. Interaction' mode. After you invoke Viper, you can start editing files
  252. by using `:e', `:vi', or `v' commands.  (*Note File and Buffer
  253. Handling::, for more information on `v' and other new commands that, in
  254. many cases, are more convenient than `:e', `:vi', and similar old-style
  255. Vi commands.)
  256.  
  257. 
  258. File: viper.info,  Node: States in Viper,  Next: The Minibuffer,  Prev: Loading Viper,  Up: Overview
  259.  
  260. States in Viper
  261. ===============
  262.  
  263.    Viper has four states, Emacs, Vi, Insert, and Replace.
  264.  
  265. `Emacs state'
  266.      This is the mode plain vanilla Emacs is normally in. After you
  267.      have loaded Viper, `C-z' will normally take you to Vi command
  268.      state. Another `C-z' will take you back to Emacs state.  This
  269.      toggle key can be changed, *note Customization::. You can also
  270.      type `M-x viper-mode' to change to Vi state.
  271.  
  272.      For users who chose to set their user level to 1 at Viper setup
  273.      time, switching to Emacs state is deliberately made harder in
  274.      order to not confuse the novice user. In this case, `C-z' will
  275.      either iconify Emacs (if Emacs runs as an application under X
  276.      Windows) or it will stop Emacs (if Emacs runs on a dumb terminal
  277.      or in an Xterm window).
  278.  
  279. `Vi state'
  280.      This is the Vi command mode. Any of the Vi commands, such as `i,
  281.      o, a', ..., will take you to Insert state. All Vi commands may be
  282.      used in this mode. Most Ex commands can also be used.  For a full
  283.      list of Ex commands supported by Viper, type `:' and then `TAB'.
  284.      To get help on any issue, including the Ex commands, type `:help'.
  285.      This will invoke Viper Info (if it is installed). Then typing `i'
  286.      will prompt you for a topic to search in the index. Note, to
  287.      search for Ex commands in the index, you should start them with a
  288.      "`:'", e.g., `:WW'.
  289.  
  290. `Insert state'
  291.      Insert state is the Vi insertion mode. `ESC' will take you back to
  292.      Vi state. Insert state editing can be done, including
  293.      auto-indentation. By default, Viper disables Emacs keybindings in
  294.      Insert state.
  295.  
  296. `Replace state'
  297.      Commands like `cw' invoke the Replace state. When you cross the
  298.      boundary of a replacement region (usually designated via a `$'
  299.      sign), it will automatically change to Insert state. You do not
  300.      have to worry about it. The key bindings remain practically the
  301.      same as in Insert state. If you type ESC, Viper will switch to Vi
  302.      command mode, terminating the replacement state.
  303.  
  304.    The modes are indicated on the "mode line" as <E>, <I>, <V>, and <R>,
  305. so that the multiple modes do not confuse you. Most of your editing can
  306. be done in Vi and Insert states. Viper will try to make all new buffers
  307. be in Vi state, but sometimes they may come up in Emacs state.  `C-z'
  308. will take you to Vi state in such a case.  In some major modes, like
  309. Dired, Info, Gnus, etc., you should not switch to Vi state (and Viper
  310. will not attempt to do so) because these modes are not intended for
  311. text editing and many of the Vi keys have special meaning there. If you
  312. plan to read news, browse directories, read mail, etc., from Emacs
  313. (which you should start doing soon!), you should learn about the
  314. meaning of the various keys in those special modes (typing `C-h m' in a
  315. buffer provides help with key bindings for the major mode of that
  316. buffer).
  317.  
  318.    If you switch to Vi in Dired or similar modes--no harm is done. It
  319. is just that the special keybindings provided by those modes will be
  320. temporarily overshadowed by Viper's bindings. Switching back to Viper's
  321. Emacs state will revive the environment provided by the current major
  322. mode.
  323.  
  324.    States in Viper are orthogonal to Emacs major modes, such as C mode
  325. or Dired mode. You can turn Viper on and off for any Emacs state. When
  326. Viper is turned on, Vi state can be used to move around. In Insert
  327. state, the bindings for these modes can be accessed.  For beginners
  328. (users at Viper levels 1 and 2), these bindings are suppressed in
  329. Insert state, so that new users are not confused by the Emacs states.
  330. Note that unless you allow Emacs bindings in Insert state, you cannot
  331. do many interesting things, like language sensitive editing. For the
  332. novice user (at Viper level 1), all major mode bindings are turned off
  333. in Vi state as well. This includes the bindings for key sequences that
  334. start with `C-c', which practically means that all major mode bindings
  335. are supported.  *Note Customization::, to find out how to allow Emacs
  336. keys in Insert state.
  337.  
  338. * Menu:
  339.  
  340. * Emacs State::         This is the state you should learn more about when
  341.                         you get up to speed with Viper.
  342. * Vi State::            Vi commands are executed in this state.
  343. * Insert State::        You can enter text, and also can do sophisticated
  344.                         editing if you know enough Emacs commands.
  345. * Replace State::       Like Insert mode, but it is invoked via the
  346.                         replacement commands, such as cw, C, R, etc.
  347.  
  348. 
  349. File: viper.info,  Node: Emacs State,  Next: Vi State,  Prev: States in Viper,  Up: States in Viper
  350.  
  351. Emacs State
  352. -----------
  353.  
  354.    You will be in this mode only by accident (hopefully). This is the
  355. state Emacs is normally in (imagine!!). Now leave it as soon as
  356. possible by typing `C-z'. The you will be in Vi state (sigh of relief)
  357. :-).
  358.  
  359.    Emacs state is actually a Viperism to denote all the major and minor
  360. modes (*Note Emacs Preliminaries::)  other than Viper that Emacs can be
  361. in. Emacs can have several modes, such as C mode for editing C
  362. programs, LaTeX mode for editing LaTeX documents, Dired for directory
  363. editing, etc. These are major modes, each with a different set of
  364. key-bindings. Viper states are orthogonal to these Emacs major modes.
  365. The presence of these language sensitive and other modes is a major win
  366. over Vi.  *Note Improvements over Vi::, for more.
  367.  
  368.    The bindings for these modes can be made available in the Viper
  369. Insert state as well as in Emacs state.  Unless you specify your user
  370. level as 1 (a novice), all major mode key sequences that start with
  371. `C-x' and `C-c' are also available in Vi state.  This is important
  372. because major modes designed for editing files, such as cc-mode or
  373. latex-mode, use key sequences that begin with `C-x' and `C-c'.
  374.  
  375.    There is also a key that lets you temporarily escape to Vi command
  376. state from Emacs state: typing `M-C-z' (or `ESC C-z') will let you
  377. execute a single Vi command while staying in Viper's Emacs state.  At
  378. present, this works only for 1-character Vi commands (and for some
  379. complex commands).
  380.  
  381. 
  382. File: viper.info,  Node: Vi State,  Next: Insert State,  Prev: Emacs State,  Up: States in Viper
  383.  
  384. Vi State
  385. --------
  386.  
  387.    This is the Vi command mode. When Viper is in Vi state, you will see
  388. the sign <V> in the mode line. Most keys will work as in Vi. The notable
  389. exceptions are:
  390.  
  391. `C-x'
  392.      `C-x' is used to invoke Emacs commands, mainly those that do window
  393.      management. `C-x 2' will split a window, `C-x 0' will close a
  394.      window. `C-x 1' will close all other windows. `C-xb' is used to
  395.      switch buffers in a window, and `C-xo' to move through windows.
  396.      These are about the only necessary keystrokes.  For the rest, see
  397.      the GNU Emacs Manual.
  398.  
  399. `C-c'
  400.      For user levels 2 and higher, this key serves as a prefix key for
  401.      the key sequences used by various major modes. For users at Viper
  402.      level 1, `C-c' simply beeps.
  403.  
  404. `C-g and C-]'
  405.      These are the Emacs `quit' keys.  There will be cases where you
  406.      will have to use `C-g' to quit. Similarly, `C-]' is used to exit
  407.      `Recursive Edits' in Emacs for which there is no comparable Vi
  408.      functionality and no key-binding. Recursive edits are indicated by
  409.      `[]' brackets framing the modes on the mode line.  *Note Recursive
  410.      Edit: (emacs)Recursive Edit.  At user level 1, `C-g' is bound to
  411.      `vip-info-on-file' function instead.
  412.  
  413. `Underscore'
  414.      Viper uses `ESC' as a switch between Insert and Vi states. Emacs
  415.      uses `ESC' for Meta. We need a Meta key to call the Meta key
  416.      functions such as `M-x function name'. The underscore key, `_',
  417.      was chosen, since it is the only reasonable, free Vi key left.
  418.      Thus, in Vi state, to get `M-x', you should type `_x' (if the
  419.      keyboard has no Meta key).  It is possible to use `ESC' as Meta,
  420.      but then you cannot press `ESC' multiple times in Vi state. *Note
  421.      Customization::, to find out how to rebind ESC to be Meta.
  422.  
  423. Other differences are mostly improvements. The ones you should know
  424. about are:
  425.  
  426. `Undo'
  427.      `u' will undo. Undo can be repeated by the `.' key. Undo itself
  428.      can be undone. Another `u' will change the direction. The presence
  429.      of repeatable undo means that `U', undoing lines, is not very
  430.      important. Therefore, `U' also calls `vip-undo'.
  431.  
  432. `Counts'
  433.      Most commands, `~', `[[', `p', `/', ..., etc., take counts.
  434.  
  435. `Regexps'
  436.      Viper uses Emacs Regular Expressions for searches. These are a
  437.      superset of Vi regular expressions, excepting the change-of-case
  438.      escapes `\u', `\L', ..., etc. *Note Regular Expressions:
  439.      (emacs)Regular Expressions, for details.  Files specified to `:e'
  440.      use `csh' regular expressions (globbing, wildcards, what have you).
  441.      However, the function `vip-toggle-search-style', bound to `C-c /',
  442.      lets the user switch from search with regular expressions to plain
  443.      vanilla search and vice versa. It also lets one switch from
  444.      case-sensitive search to case-insensitive and back.  *Note Viper
  445.      Specials::, for more details.
  446.  
  447. `Ex commands'
  448.      The current working directory of a buffer is automatically
  449.      inserted in the minibuffer if you type `:e' then space.  Absolute
  450.      filenames are required less often in Viper.  For path names, Emacs
  451.      uses a convention that is slightly different from that of Unix.
  452.      It is designed to minimize the need for deleting path names that
  453.      Emacs provides in its prompts. (This is usually convenient, but
  454.      occasionally the prompt may suggest a wrong path name for you.) If
  455.      you see a prompt `/usr/foo/' and you wish to edit the file
  456.      `~/.vip', you don't have to erase the prompt. Instead, simply
  457.      continue typing what you need. Emacs will interpret
  458.      `/usr/foo/~/.vip' correctly. Similarly, if the prompt is `~/foo/'
  459.      and you need to get to `/bar/file', keep typing. Emacs interprets
  460.      `~/foo//bar/' as `/bar/file', since when it sees `//', it
  461.      understands that `~/foo/' is to be discarded.
  462.  
  463.      The command `:cd' will change the default directory for the
  464.      current buffer. The command `:e' will interpret the filename
  465.      argument in `csh'. *Note Customization::, if you want to change
  466.      the default shell.  The command `:next' takes counts from `:args',
  467.      so that `:rew' is obsolete. Also, `:args' will show only the
  468.      invisible files (i.e., those that are not currently seen in Emacs
  469.      windows).
  470.  
  471.      When applicable, Ex commands support file completion and history.
  472.      This means that by typing a partial file name and then `TAB',
  473.      Emacs will try to complete the name or it will offer a menu of
  474.      possible completions.  This works similarly to Tcsh and extends
  475.      the behavior of Csh. While Emacs is waiting for a file name, you
  476.      can type `M-p' to get the previous file name you typed. Repeatedly
  477.      typing `M-p' and `M-n' will let you browse through the file
  478.      history.
  479.  
  480.      Like file names, partially typed Ex commands can be completed by
  481.      typing `TAB', and Viper keeps the history of Ex commands. After
  482.      typing `:', you can browse through the previously entered Ex
  483.      commands by typing `M-p' and `M-n'.  Viper tries to rationalize
  484.      when it puts Ex commands on the history list.  For instance, if
  485.      you typed `:w! foo', only `:w!'  will be placed on the history
  486.      list. This is because the last history element is the default that
  487.      can be invoked simply by typing `: RET'. If `:w! foo' were placed
  488.      on the list, it would be all to easy to override valuable data in
  489.      another file. Reconstructing the full command, `:w!  foo', from
  490.      the history is still not that hard, since Viper has a separate
  491.      history for file names. By typing `: M-p', you will get `:w!' in
  492.      the Minibuffer. Then, repeated `M-p' will get you through the file
  493.      history, inserting one file name after another.
  494.  
  495.      In contrast to `:w! foo', if the command were `:r foo', the entire
  496.      command will appear in the history list. This is because having
  497.      `:r' alone as a default is meaningless, since this command
  498.      requires a file argument.
  499.  
  500. As Vi, Viper's destructive commands can be re-executed by typing ``.''.
  501. However, in addition, Viper keeps track of the history of such
  502. commands. This history can be perused by typing `C-c M-p' and `C-c M-n'.
  503. Having found the appropriate command, it can be then executed by typing
  504. ``.''.  *Note Improvements over Vi::, for more information.
  505.  
  506. 
  507. File: viper.info,  Node: Insert State,  Next: Replace State,  Prev: Vi State,  Up: States in Viper
  508.  
  509. Insert State
  510. ------------
  511.  
  512.    To avoid confusing the beginner (at Viper level 1 and 2), Viper
  513. makes only the standard Vi keys available in Insert state. The
  514. implication is that Emacs major modes cannot be used Insert state.  It
  515. is strongly recommended that as soon as you are comfortable, make the
  516. Emacs state bindings visible (by changing your user level to 3 or
  517. higher).  *Note Customization::, to see how to do this.
  518.  
  519.    Once this is done, it is possible to do quite a bit of editing in
  520. Insert state. For instance, Emacs has a "yank" command, `C-y', which is
  521. similar to Vi's `p'. However, unlike `p', `C-y' can be used in Insert
  522. state of Viper. Emacs also has a kill ring where it keeps pieces of
  523. text you deleted while editing buffers. The command `M-y' is used to
  524. delete the text previously put back by Emacs' `C-y' or by Vi's `p'
  525. command and reinsert text that was placed on the kill-ring earlier.
  526.  
  527.    This works both in Vi and Insert states.  In Vi state, `M-y' is a
  528. much better alternative to the usual Vi's way of recovering the 10
  529. previously deleted chunks of text. In Insert state, you can use this as
  530. follows. Suppose you deleted a piece of text and now you need to
  531. re-insert it while editing in Insert mode. The key `C-y' will put back
  532. the most recently deleted chunk. If this is not what you want, type
  533. `M-y' repeatedly and, hopefully, you will find the chunk you want.
  534.  
  535.    Finally, in Insert and Replace states, Viper provides the history of
  536. pieces of text inserted in previous insert or replace commands.  These
  537. strings of text can be recovered by repeatedly typing `C-c M-p' or `C-c
  538. M-n' while in Insert or Replace state. (This feature is disabled in the
  539. minibuffer: the above keys are usually bound to other histories, which
  540. are more appropriate in the minibuffer.)
  541.  
  542.    You can call Meta functions from Insert state. The Vi-to-Emacs
  543. toggle key, normally `C-z', is bound to Meta in Insert state. Thus
  544. `M-x' is typed as `C-zx'. The key `_' will now insert itself--it is not
  545. a Meta key in Insert state. (It is well understood that switching Meta
  546. keys around is inconvenient. However, there seems to be no way around
  547. this problem, short of changing Vi ESC key to something else. *Note
  548. Customization::, for the information on `vip-ESC-key', which can be
  549. used to free up `ESC' and designate some other key to do escape from
  550. Insert state to Vi state.)
  551.  
  552.    Other Emacs commands that are useful in Insert state are `C-e' and
  553. `C-a', which move the cursor to the end and the beginning of the
  554. current line, respectively. You can also use `M-f' and `M-b', which
  555. move the cursor forward (or backward) one word.  If your display has a
  556. Meta key, these functions are invoked by holding the Meta key and then
  557. typing `f' and `b', respectively. On displays without the Meta key,
  558. these functions are invoked by typing `C-z f' and `C-z b' (`C-z'
  559. simulates the Meta key in Insert state, as explained above).
  560.  
  561.    When Viper is in Insert state, you will see <I> in the mode line.
  562.  
  563. 
  564. File: viper.info,  Node: Replace State,  Prev: Insert State,  Up: States in Viper
  565.  
  566. Replace State
  567. -------------
  568.  
  569.    This state is entered through Vi replacement commands, such as `C',
  570. `cw', etc., or by typing `R'. In Replace state, Viper puts <R> in the
  571. mode line to let you know which state is in effect. If Replace state is
  572. entered through `R', Viper stays in that state until the user hits ESC.
  573. If this state is entered via the other replacement commands, then
  574. Replace state is in effect until you hit `ESC' or until you cross the
  575. rightmost boundary of the replacement region. In the latter case, Viper
  576. changes its state from Replace to Insert (which you will notice by the
  577. change in the mode line).
  578.  
  579.    Since Viper runs under Emacs, it is possible to switch between
  580. buffers while in Replace state. You can also move the cursor using the
  581. arrow keys (even on dumb terminals!) and the mouse. Because of this
  582. freedom (which is unattainable in regular Vi), it is possible to take
  583. the cursor outside the replacement region. (This may be necessary for
  584. several reasons, including the need to enable text selection and
  585. region-setting with the mouse.)
  586.  
  587.    The issue then arises as to what to do when the user hits the ESC
  588. key. In Vi, this would cause the text between cursor and the end of the
  589. replacement region to be deleted. But what if, as is possible in Viper,
  590. the cursor is not inside the replacement region?
  591.  
  592.    To solve the problem, Viper keeps track of the last cursor position
  593. while it was still inside the replacement region. So, in the above
  594. situation, Viper would delete text between this position and the end of
  595. the replacement region.
  596.  
  597. 
  598. File: viper.info,  Node: The Minibuffer,  Next: Multiple Files in Viper,  Prev: States in Viper,  Up: Overview
  599.  
  600. The Minibuffer
  601. ==============
  602.  
  603.    The Minibuffer is where commands are entered in. Editing can be done
  604. by commands from Insert state, namely:
  605.  
  606. `C-h'
  607.      Backspace
  608.  
  609. `C-w'
  610.      Delete Word
  611.  
  612. `C-u'
  613.      Erase line
  614.  
  615. `C-v'
  616.      Quote the following character
  617.  
  618. `RET'
  619.      Execute command
  620.  
  621. `C-g and C-]'
  622.      Emacs quit and abort keys. These may be necessary. *Note Vi
  623.      State::, for an explanation.
  624.  
  625. `M-p and M-n'
  626.      These keys are bound to functions that peruse minibuffer history.
  627.      The precise history to be perused depends on the context. It may
  628.      be the history of search strings, Ex commands, file names, etc.
  629.  
  630.    Most of the Emacs keys are functional in the Minibuffer.  While in
  631. the Minibuffer, Viper tries to make editing resemble Vi's behavior when
  632. the latter is waiting for the user to type an Ex command. In
  633. particular, you can use the regular Vi commands to edit the Minibuffer.
  634. You can switch between the Vi state and Insert state at will, and even
  635. use the replace mode.  Initially, the Minibuffer comes up in Insert
  636. state.
  637.  
  638.    Some users prefer plain Emacs bindings in the Minibuffer. To this
  639. end, set `vip-vi-style-in-minibuffer' to `nil' in `.vip'.  *Note
  640. Customization::, to learn how to do this.
  641.  
  642.    When the Minibuffer changes Viper states, you will notice that the
  643. appearance of the text there changes as well. This is useful because
  644. the Minibuffer has no mode line to tell which Vi state it is in.  The
  645. appearance of the text in the Minibuffer can be changed.  *Note Viper
  646. Specials::, for more details.
  647.  
  648. 
  649. File: viper.info,  Node: Multiple Files in Viper,  Next: Unimplemented Features,  Prev: The Minibuffer,  Up: Overview
  650.  
  651. Multiple Files in Viper
  652. =======================
  653.  
  654.    Viper can edit multiple files. This means, for example that you
  655. never need to suffer through `No write since last change' errors.  Some
  656. Viper elements are common over all the files.
  657.  
  658. `Textmarkers'
  659.      Textmarkers remember *files and positions*.  If you set marker `a'
  660.      in file `foo', start editing file `bar' and type `'a', then *YOU
  661.      WILL SWITCH TO FILE `foo'*. You can see the contents of a
  662.      textmarker using the Viper command `[<a-z>' where <a-z> are the
  663.      textmarkers, e.g., `[a' to view marker `a' .
  664.  
  665. `Repeated Commands'
  666.      Command repetitions are common over files. Typing `!!' will repeat
  667.      the last `!' command whichever file it was issued from.  Typing
  668.      `.' will repeat the last command from any file, and searches will
  669.      repeat the last search. Ex commands can be repeated by typing
  670.      `:RET'.  Note: in some rare cases, that `:RET' may do something
  671.      dangerous.  However, usually its effect can be undone by typing
  672.      `u'.
  673.  
  674. `Registers'
  675.      Registers are common to files. Also, text yanked with `y' can be
  676.      put back (`p') into any file. The Viper command `]<a-z>', where
  677.      <a-z> are the registers, can be used to look at the contents of a
  678.      register, e.g., type `]a' to view register `a'.
  679.  
  680.      There is one difference in text deletion that you should be aware
  681.      of. This difference comes from Emacs and was adopted in Viper
  682.      because we find it very useful. In Vi, if you delete a line, say,
  683.      and then another line, these two deletions are separated and are
  684.      put back separately if you use the `p' command. In Emacs (and
  685.      Viper), successive series of deletions that are *not interrupted*
  686.      by other commands are lumped together, so the deleted text gets
  687.      accumulated and can be put back as one chunk. If you want to break
  688.      a sequence of deletions so that the newly deleted text could be
  689.      put back separately from the previously deleted text, you should
  690.      perform a non-deleting action, e.g., move the cursor one character
  691.      in any direction.
  692.  
  693. `Absolute Filenames'
  694.      The current directory name for a file is automatically prepended
  695.      to the file name in any `:e', `:r', `:w', etc., command (in Emacs,
  696.      each buffer has a current directory).  This directory is inserted
  697.      in the Minibuffer once you type space after `:e, r', etc. Viper
  698.      also supports completion of file names and Ex commands (`TAB'),
  699.      and it keeps track of command and file history (`M-p', `M-n').
  700.      Absolute filenames are required less often in Viper.
  701.  
  702.      You should be aware that Emacs interprets `/foo/bar//bla' as
  703.      `/bla' and `/foo/~/bar' as `~/bar'. This is designed to minimize
  704.      the need for erasing path names that Emacs suggests in its
  705.      prompts, if a suggested path name is not what you wanted.
  706.  
  707.      The command `:cd' will change the default directory for the
  708.      current Emacs buffer. The Ex command `:e' will interpret the
  709.      filename argument in `csh', by default. *Note Customization::, if
  710.      you want to change this.
  711.  
  712. Currently undisplayed files can be listed using the `:ar' command.  The
  713. command `:n' can be given counts from the `:ar' list to switch to other
  714. files.
  715.  
  716. 
  717. File: viper.info,  Node: Unimplemented Features,  Prev: Multiple Files in Viper,  Up: Overview
  718.  
  719. Unimplemented Features
  720. ======================
  721.  
  722.    Unimplemented features include:
  723.  
  724.    * `:ab' and `:una' are not implemented.  Both `:map' and `:ab' are
  725.      considered obsolete, since Emacs has much more powerful facilities
  726.      for defining keyboard macros and abbreviations.
  727.  
  728.    * `:set option?' is not implemented. The current `:set' can also be
  729.      used to set Emacs variables.
  730.  
  731.    * `:se list' requires modification of the display code for Emacs, so
  732.      it is not implemented.  A useful alternative is `cat -t -e file'.
  733.      Unfortunately, it cannot be used directly inside Emacs, since
  734.      Emacs will obdurately change `^I' back to normal tabs.
  735.  
  736. 
  737. File: viper.info,  Node: Improvements over Vi,  Next: Customization,  Prev: Overview,  Up: Top
  738.  
  739. Improvements over Vi
  740. ********************
  741.  
  742.    Some common problems with Vi and Ex have been solved in Viper. This
  743. includes better implementation of existing commands, new commands, and
  744. the facilities provided by Emacs.
  745.  
  746. * Menu:
  747.  
  748. * Basics::                  Basic Viper differences, Multi-file effects.
  749. * Undo and Backups::        Multiple undo, auto-save, backups and changes
  750. * History::                 History for Ex and Vi commands.
  751. * Macros and Registers::    Keyboard Macros (extended ".") @reg execution.
  752. * Completion::              Filename and Command Completion for Ex.
  753. * Improved Search::         Incremental Search and Buffer Content Search.
  754. * Abbreviation Facilities:: Normal Abbrevs, Templates, and Dynamic Abbrevs.
  755. * Movement and Markers::    Screen Editor movements, viewing textmarkers.
  756. * New Commands::            Commands that do not exist in Vi.
  757. * Useful Packages::         A Sampling of some Emacs packages, and things
  758.                             you should know about.
  759.  
  760. 
  761. File: viper.info,  Node: Basics,  Next: Undo and Backups,  Prev: Improvements over Vi,  Up: Improvements over Vi
  762.  
  763. Basics
  764. ======
  765.  
  766.    The Vi command set is based on the idea of combining motion commands
  767. with other commands. The motion command is used as a text region
  768. specifier for other commands.  We classify motion commands into "point
  769. commands" and "line commands".
  770.  
  771.    The point commands are:
  772.  
  773.      `h', `l', `0',  `$', `w', `W', `b', `B', `e', `E', `(', `)', `/',
  774.      `?', ``', `f', `F', `t', `T', `%', `;', `,', `^'
  775.  
  776.    The line commands are:
  777.  
  778.      `j', `k', `+', `-', `H', `M', `L', `{', `}', `G', `'',  `[[',
  779.      `]]', `[]'
  780.  
  781. If a point command is given as an argument to a modifying command, the
  782. region determined by the point command will be affected by the modifying
  783. command. On the other hand, if a line command is given as an argument
  784. to a modifying command, the region determined by the line command will
  785. be enlarged so that it will become the smallest region properly
  786. containing the region and consisting of whole lines (we call this
  787. process "expanding the region"), and then the enlarged region will be
  788. affected by the modifying command.  Text Deletion Commands (*Note
  789. Deleting Text::), Change commands (*Note Changing Text::), even Shell
  790. Commands (*Note Shell Commands::) use these commands to describe a
  791. region of text to operate on.  Thus, type `dw' to delete a word, `>}'
  792. to shift a paragraph, or `!'afmt' to format a region from `point' to
  793. textmarker `a'.
  794.  
  795.    Viper adds the region specifiers `r' and `R'. Emacs has a special
  796. marker called "mark". The text-area between the current cursor position
  797. "point" and the "mark" is called the "region".  `r' specifies the raw
  798. region and `R' is the expanded region (i.e., the minimal contiguous
  799. chunk of full lines that contains the raw region).  `dr' will now
  800. delete the region, `>r' will shift it, etc.  `r,R' are not motion
  801. commands, however. The special mark is set by `m.' and other commands.
  802. *Note Marking::, for more info.
  803.  
  804.    Viper also adds counts to most commands for which it would make
  805. sense.
  806.  
  807.    In the Overview chapter, some Multiple File issues were discussed
  808. (*Note Multiple Files in Viper::). In addition to the files, Emacs has
  809. buffers. These can be seen in the `:args' list and switched using
  810. `:next' if you type `:set ex-cycle-through-non-files t', or specify
  811. `(setq ex-cycle-through-non-files t)' in your `.vip' file. *Note
  812. Customization::, for details.
  813.  
  814. 
  815. File: viper.info,  Node: Undo and Backups,  Next: History,  Prev: Basics,  Up: Improvements over Vi
  816.  
  817. Undo and Backups
  818. ================
  819.  
  820.    Viper provides multiple undo. The number of undo's and the size is
  821. limited by the machine. The Viper command `u' does an undo. Undo can be
  822. repeated by typing `.' (a period). Another `u' will undo the undo, and
  823. further `.' will repeat it. Typing `u' does the first undo, and changes
  824. the direction.
  825.  
  826.    Since the undo size is limited, Viper can create backup files and
  827. auto-save files. It will normally do this automatically. It is possible
  828. to have numbered backups, etc. For details, *note Backup and Auto-Save:
  829. (emacs)Backup.
  830.  
  831.    The results of the 9 previous changes are available in the 9 numeric
  832. registers, as in Vi. The extra goody is the ability to *view* these
  833. registers, in addition to being able to access them through `p' and
  834. `M-y' (*Note Insert State::, for details.) The Viper command `]
  835. register' will display the contents of any register, numeric or
  836. alphabetical. The related command `[ textmarker' will show the text
  837. around the textmarker. `register' and `textmarker' can be any letters
  838. from a through z.
  839.  
  840. 
  841. File: viper.info,  Node: History,  Next: Macros and Registers,  Prev: Undo and Backups,  Up: Improvements over Vi
  842.  
  843. History
  844. =======
  845.  
  846.    History is provided for Ex commands, Vi searches, file names, pieces
  847. of text inserted in earlier commands that use Insert or Replace state,
  848. and for destructive commands in Vi state. These are useful for fixing
  849. those small typos that screw up searches and `:s', and for eliminating
  850. routine associated with repeated typing of file names or pieces of text
  851. that need to be inserted frequently.  At the `:' or `/' prompts in the
  852. Minibuffer, you can do the following:
  853.  
  854. `M-p and M-n'
  855.      To move to previous and next history items. This causes the history
  856.      items to appear on the command line, where you can edit them, or
  857.      simply type Return to execute.
  858.  
  859. `M-r and M-s'
  860.      To search backward and forward through the history.
  861.  
  862. `RET'
  863.      Type RET to accept a default (which is displayed in the prompt).
  864.  
  865.    The history of insertions  can be perused by typing `C-c M-p' and
  866. `C-c M-n' while in Insert or Replace state.  The history of destructive
  867. Vi commands can be perused via the same keys when Viper is in Vi state.
  868. *Note Viper Specials::, for details.
  869.  
  870.    All Ex commands have a file history. For instance, typing `:e', space
  871. and then `M-p' will bring up the name of the previously typed file
  872. name. Repeatedly typing `M-p', `M-n', etc., will let you browse through
  873. the file history.
  874.  
  875.    Similarly, commands that have to do with switching buffers have a
  876. buffer history, and commands that expect strings or regular expressions
  877. keep a history on those items.
  878.  
  879. 
  880. File: viper.info,  Node: Macros and Registers,  Next: Completion,  Prev: History,  Up: Improvements over Vi
  881.  
  882. Macros and Registers
  883. ====================
  884.  
  885.    Viper facilitates the use of Emacs-style keyboard macros. `@#' will
  886. start a macro definition.  As you type, the commands will be executed,
  887. and remembered (This is called "learn mode" in some editors.)
  888. `@register' will complete the macro, putting it into `register', where
  889. `register' is any character from `a' through `z'. Then you can execute
  890. this macro using `@register'. It is, of course, possible to yank some
  891. text into a register and execute it using `@register'. Typing `@@',
  892. `@RET', or `@LF' will execute the last macro that was executed using
  893. `@register'.
  894.  
  895.    Viper will automatically lowercase the register, so that pressing the
  896. `SHIFT' key for `@' will not create problems. This is for `@' macros
  897. and `"p' *only*. In the case of `y', `"Ayy' will append to *register
  898. a*. For `[,],',`', it is an error to use a Uppercase register name.
  899.  
  900.    The contents of a register can be seen by `]register'. (`[textmarker'
  901. will show the contents of a textmarker).
  902.  
  903.    The last keyboard macro can also be executed using `*', and it can
  904. be yanked into a register using `@!register'.  This is useful for Emacs
  905. style keyboard macros defined using `C-x(' and `C-x)'. Emacs keyboard
  906. macros have more capabilities.  *Note Keyboard Macros: (emacs)Keyboard
  907. Macros, for details.
  908.  
  909.    Keyboard Macros allow an interesting form of Query-Replace:
  910. `/pattern' or `n' to go to the next pattern (the query), followed by a
  911. Keyboard Macro execution `@@' (the replace).
  912.  
  913.    Viper also provides Vi-style macros. *Note Vi Macros::, for details.
  914.  
  915. 
  916. File: viper.info,  Node: Completion,  Next: Improved Search,  Prev: Macros and Registers,  Up: Improvements over Vi
  917.  
  918. Completion
  919. ==========
  920.  
  921.    Completion is done when you type `TAB'. The Emacs completer does not
  922. grok wildcards in filenames. Once you type a wildcard, the completer
  923. will no longer work for that path.  Remember that Emacs interprets a
  924. file name of the form `/foo//bar' as `/bar' and `/foo/~/bar' as `~/bar'.
  925.  
  926. 
  927. File: viper.info,  Node: Improved Search,  Next: Abbreviation Facilities,  Prev: Completion,  Up: Improvements over Vi
  928.  
  929. Improved Search
  930. ===============
  931.  
  932.    Viper provides buffer search, the ability to search the buffer for a
  933. region under the cursor. You have to turn this on in `.vip' either by
  934. calling
  935.  
  936.      (vip-buffer-search-enable)
  937.  
  938. or by setting `vip-buffer-search-char' to, say, `f3':
  939.      (setq vip-buffer-search-char [f3])
  940.  
  941. If the user calls `vip-buffer-search-enable' explicitly (the first
  942. method), then `vip-buffer-search-char' will be set to `g'.  Regardless
  943. of how this feature is enabled, the key `vip-buffer-search-char' will
  944. take movement commands, like `w,/,e', to find a region and then search
  945. for the contents of that region. This command is very useful for
  946. searching for variable names, etc., in a program. The search can be
  947. repeated by `n' or reversed by `N'.
  948.  
  949.    Emacs provides incremental search. As you type the string in, the
  950. cursor will move to the next match. You can snarf words from the buffer
  951. as you go along. Incremental Search is normally bound to `C-s' and
  952. `C-r'. *Note Customization::, to find out how to change the bindings of
  953. `C-r or C-s'.  For details, *note Incremental Search:
  954. (emacs)Incremental Search.
  955.  
  956.    Viper also provides a query replace function that prompts through the
  957. Minibuffer. It is invoked by the `Q' key in Vi state.
  958.  
  959.    On a window display, Viper supports mouse search, i.e., you can
  960. search for a word by clicking on it. *Note Viper Specials::, for
  961. details.
  962.  
  963.    Finally, on a window display, Viper highlights search patterns as it
  964. finds them. This is done through what is known as *faces* in Emacs. The
  965. variable that controls how search patterns are highlighted is
  966. `vip-search-face'.  If you don't want any highlighting at all, put
  967.      (copy-face 'default 'vip-search-face)
  968.  
  969. in `~/.vip'. If you want to change how patterns are highlighted, you
  970. will have to set the variable `vip-search-face' to some other face,
  971. such as `highlight'. If none of the existing faces fits the bill, you
  972. may have to create your own. Further details on faces can be found in
  973. the Emacs Lisp Manual.
  974.  
  975. 
  976. File: viper.info,  Node: Abbreviation Facilities,  Next: Movement and Markers,  Prev: Improved Search,  Up: Improvements over Vi
  977.  
  978. Abbreviation Facilities
  979. =======================
  980.  
  981.    It is possible in Emacs to define abbrevs based on the contents of
  982. the buffer.  Sophisticated templates can be defined using the Emacs
  983. abbreviation facilities. *Note Abbreviations: (emacs)Abbrevs, for
  984. details.
  985.  
  986.    Emacs also provides Dynamic Abbreviations. Given a partial word,
  987. Emacs will search the buffer to find an extension for this word. For
  988. instance, one can type `Abbreviations' by typing `A', followed by a
  989. keystroke that completed the `A' to `Abbreviations'. Repeated typing
  990. will search further back in the buffer, so that one could get `Abbrevs'
  991. by repeating the keystroke, which appears earlier in the text. Emacs
  992. binds this to `ESC /', so you will have to find a key and bind the
  993. function `dabbrev-expand' to that key.  Facilities like this make Vi's
  994. `:ab' command obsolete.
  995.  
  996. 
  997. File: viper.info,  Node: Movement and Markers,  Next: New Commands,  Prev: Abbreviation Facilities,  Up: Improvements over Vi
  998.  
  999. Movement and Markers
  1000. ====================
  1001.  
  1002.    Viper can be set free from the line-limited movements in Vi, such as
  1003. `l' refusing to move beyond the line, `ESC' moving one character back,
  1004. etc. These derive from Ex, which is a line editor. If your `.vip'
  1005. contains
  1006.  
  1007.      `(setq vip-ex-style-motion nil)'
  1008.  
  1009. the motion will be a true screen editor motion. One thing you must then
  1010. watch out for is that it is possible to be on the end-of-line character.
  1011. The keys `x' and `%' will still work correctly, i.e., as if they were
  1012. on the last character.
  1013.  
  1014.    Textmarkers in Viper remember the file and the position, so that you
  1015. can switch files by simply doing `'a'. If you set up a regimen for using
  1016. Textmarkers, this is very useful. Contents of textmarkers can be viewed
  1017. by `[marker'. (Contents of registers can be viewed by `]register').
  1018.  
  1019.